package com.leyu.mall.site.sale.controller;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.leyu.mall.site.sale.service.ISaleRankListService;

/**
 * 〈一句话功能简述〉 〈功能详细描述〉
 * 
 * @author OOKK
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本] （可选）
 */
@Controller
@Scope(value = "prototype")
@RequestMapping("sale/saleranklist")
public class SaleRankListController {

	@Resource(name = "saleRankListServiceImpl")
	private ISaleRankListService saleRankListServiceImpl;
 
	@RequestMapping(value = "", method = RequestMethod.GET)
	public String index(Model model) throws Exception {
		try {
			model.addAttribute("ranklist", saleRankListServiceImpl
					.getAllSaleRankList());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return "sale/saleranklist.html";
	}
}
